package Sequence;


import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        /*int nums[]={1,2,3,4,5,6,7};
        int newArr[]=new int[7];
        int y=3;
        int n=nums.length;
        for(int i=0;i<n;i++){
            if((i+y)>=n){
                newArr[i-y-1]=nums[i];
            }else{
                newArr[i+3]=nums[i];
            }
        }
        String s= Arrays.toString(newArr);
        System.out.println(s);*/

        /********/
       /* int nums[]={1,2,3,4,5,6,7};
        int k=3;
        int n=nums.length;
        int newArr[]=new int[n];
        for(int i=0;i<n;i++){
            if((i+k)>=n){
                newArr[i-k-1]=nums[i];
            }else{
                newArr[i+3]=nums[i];
            }
        }
        for(int row:newArr){
            System.out.print(row);
        }*/
        /*********/
       /* String string="";
        Scanner in=new Scanner(System.in);
        String str1=in.nextLine();
        for(int i=0;i<str1.length();i++){
            char ch=str1.charAt(i);
            System.out.println(ch);
            if(!string.contains(ch+"")){
                string += ch;
            }
        }
        System.out.println(string);*/
        /**********************/
     /*   Scanner sc=new Scanner(System.in);
        String string=sc.nextLine();
        StringBuilder stringBuilder=new StringBuilder();
        for (int i = 0; i <string.length() ; i++) {
            char ch=string.charAt(i);
            if (stringBuilder.indexOf(ch+"")<0){
                System.out.println(stringBuilder.indexOf(ch+""));
                stringBuilder.append(ch);
            }
        }
        String str=stringBuilder.toString();
        System.out.println(str);*/

        /**********************/

      /* Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] arr = new char[str.length()];
        char ch = str.charAt(0);
        arr[0] = ch;
        int k=1;
        for (int i = 1; i < str.length(); i++) {
            boolean bool=true;
            ch=str.charAt(i);
            for (int j = 0; j < str.length(); j++) {
                if (ch==arr[j]){
                    bool=false;
                }
            }
            if(bool==true){
                arr[k]=ch;
                ++k;
                System.out.println(k);
            }
        }

        String str1=str.valueOf(arr);
        System.out.println(str1);*/
        /************/
        int nums[] = {-1,1,99,100};
        int k = 2;
        int n = nums.length;
        int newArr[] = new int[n];
        for (int i = 0; i < n; i++) {
            if ((i + k) >= n) {
                newArr[i+k-n] = nums[i];
            } else {
                newArr[i + k] = nums[i];
            }
        }
        for (int i = 0; i < n; i++) {
            nums[i] = newArr[i];
            System.out.print(nums[i]+" ");
        }
    }
}


